package com.reservation.controller.staff;

import com.reservation.result.Result;
import com.reservation.service.StaffService;
import com.reservation.vo.staff.MeetingRoomVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 员工会议室相关接口
 */
@RestController
@RequestMapping("api/staff")
@Api(tags = "员工会议室相关接口")
@Slf4j
public class MeetingRoomController {

    @Autowired
    private StaffService staffService;

    /**
     * 获取会议室列表
     * @return 会议室列表
     */
    @PostMapping("/getMeetingRoomList")
    @ApiOperation("获取会议室列表")
    public Result<List<MeetingRoomVO>> getMeetingRoomList() {
        log.info("获取员工端会议室列表");
        List<MeetingRoomVO> meetingRoomList = staffService.getMeetingRoomList();
        return Result.success(meetingRoomList);
    }
}
